package cn.iocoder.yudao.module.crossborder.platform.controller.admin.platformwebhooklog.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 跨境电商平台Webhook事件日志新增/修改 Request VO")
@Data
public class PlatformWebhookLogSaveReqVO {

    @Schema(description = "日志编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "7778")
    private Long id;

    @Schema(description = "Webhook配置编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "5384")
    @NotNull(message = "Webhook配置编号不能为空")
    private Long webhookId;

    @Schema(description = "平台编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "25563")
    @NotNull(message = "平台编号不能为空")
    private Long platformId;

    @Schema(description = "店铺编号", example = "15666")
    private Long storeId;

    @Schema(description = "事件ID", example = "17163")
    private String eventId;

    @Schema(description = "事件类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotEmpty(message = "事件类型不能为空")
    private String eventType;

    @Schema(description = "请求头")
    private String requestHeaders;

    @Schema(description = "请求体")
    private String requestBody;

    @Schema(description = "响应状态码", example = "1")
    private Integer responseStatus;

    @Schema(description = "响应体")
    private String responseBody;

    @Schema(description = "处理状态（0待处理 1处理中 2处理成功 3处理失败）", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "处理状态（0待处理 1处理中 2处理成功 3处理失败）不能为空")
    private Integer processStatus;

    @Schema(description = "处理时间")
    private LocalDateTime processTime;

    @Schema(description = "处理时长（毫秒）")
    private Integer processDuration;

    @Schema(description = "错误信息")
    private String errorMsg;

    @Schema(description = "重试次数", requiredMode = Schema.RequiredMode.REQUIRED, example = "6125")
    @NotNull(message = "重试次数不能为空")
    private Integer retryCount;

    @Schema(description = "业务类型", example = "2")
    private String businessType;

    @Schema(description = "业务数据ID", example = "1796")
    private Long businessId;

    @Schema(description = "来源IP")
    private String sourceIp;

    @Schema(description = "用户代理")
    private String userAgent;

}